public class Web2LeadExtension {

    private final Lead weblead;
    
    public Web2LeadExtension(ApexPages.StandardController controller) {

    }
    
     public String saveLead() {
       try {
       insert(weblead);
       }
       catch(System.DMLException e) {
           ApexPages.addMessages(e);
           return null;
       }
       //PageReference p = Page.ThankYou;
       //p.setRedirect(true);
       return null;
     }

}